/**
 * @author Jialun Bian
 * @version 1.0
 */
package userInterface;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class CommandPanel extends JPanel implements ActionListener{
    public CommandPanel() {
        super(new BorderLayout());

        JTextField commandField = new JTextField(20);
        add(commandField,BorderLayout.PAGE_END);

        JTextArea messageArea = new JTextArea(
                "This is the Area for echo command that have been done and the message from the PCLOGO"
        );
        //messageArea.setFont(new Font("Serif", Font.ITALIC, 16));
        //messageArea.setLineWrap(true);
        //messageArea.setWrapStyleWord(true);
        //JScrollPane areaScrollPane = new JScrollPane(messageArea);
        //areaScrollPane.setVerticalScrollBarPolicy(
                        //JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        //areaScrollPane.setPreferredSize(new Dimension(250, 250));
        //areaScrollPane.setBorder(
            //BorderFactory.createCompoundBorder(
                //BorderFactory.createCompoundBorder(
                                //BorderFactory.createTitledBorder("Plain Text"),
                                //BorderFactory.createEmptyBorder(5,5,5,5)),
                //areaScrollPane.getBorder()));
        add(messageArea,BorderLayout.PAGE_START);
    }
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        //inplement the cmd
    }

}
